package com.kongxiang.cubebit.ui.api.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

/**
 * 向量搜索请求DTO
 *
 * @author kongxiang
 * @version 1.0
 * @since 2023-01-01
 */
@Data
@Schema(description = "向量搜索请求")
public class VectorSearchRequest {
    @NotNull(message = "查询条件不能为空")
    @Schema(description = "查询条件")
    private String query;

    @NotNull(message = "K值不能为空")
    @Min(value = 1, message = "K值至少为1")
    @Schema(description = "返回结果数量",defaultValue = "5")
    private int k;

    @Schema(description = "相似度阈值",defaultValue = "0")
    private double threshold;

    @Schema(description = "模型名称")
    private String model;
}